home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
keyb
/
d5macs.zip
/
MACROS.DOC
< prev
Wrap
Text File
|
1991-06-22
|
12KB
|
347 lines
MACROS.DOC
"The Macro Starter Kit" is shareware (c) copyright, 1991, by Chet Langin,
Langin Software, 532 W. 3rd St., Centralia, IL 62801 USA. CIS: 73770,615.
This is version 1.00.
Who may distribute this:
Any ASP vendor.
Any BBS. (The preferred filename is MACROS.ZIP.)
Anyone for non-commercial reasons.
Others must obtain permission from Langin Software. Permission will be
granted to those who support registration fees for shareware authors.
The registration fee is US $10.00.
"The Macro Starter Kit" is a collection of 19 macros for MS-DOS 5, which is
required. Each macro is described in this manual. The macros are:
format mbeep mclear mdate
mdir mfilelist mfind mformfeed
mhelp mlinefeed mlinefeed8 mmd
mmem mparent mprint mroot
mtime mtype mwhereis
The Macro Starter Kit is for people who already have some experience in
using DOS. It is not for beginners.
Installation, and how to use this kit:
(1) Print this file, so you can read it while you're working at your
computer.
(2) The following command should be in your AUTOEXEC.BAT file:
doskey /bufsize=1024>nul
This needs to be in the AUTOEXEC.BAT file because the buffer size should
only be set once. Don't forget to reboot.
(3) The macros are located in the MACROS.BAT file. Copy this file to
whatever directory you use to keep your batch files in. Then, run it.
The batch file will install the macros for you.
(4) Refer to the following explanations of the macros as you try them.
Some are easy, some are not. To try a macro, simply enter the macro's
name at the DOS prompt. Look at the "Usage" for each macro, listed below,
to see if parameters or switches are needed. Some macros are extremely fast,
and others take several seconds (be patient).
Note: This kit is not intended to repeat the explanations of macros in the
MS-DOS 5 manual.
(5) Use the editor of your choice to change the MACROS.BAT file. You have
four options:
A) The macros you like, leave them.
B) The macros you don't like, delete them.
C) The macros you almost like, change them.
D) Add your own macros to the file.
Beware: The MACROS.BAT file contains "control characters," such as beep,
formfeed, and linefeed characters.
(6) Run the MACROS.BAT file, again, (and, again,) until you get it like you
want it. Each time you run it, the currently installed macros will be
updated, if appropriate, to match the file. If you add many macros, you
may need to increase the buffer size (see Step 2, above). If you are
having trouble with a particular macro, put it in its own batch file to
install and test it. When it works, add it to the MACROS.BAT file.
(7) When you have the MACROS.BAT file like you want it, add the following
line to your AUTOEXEC.BAT file:
call macros
This will run your batch file for you. Don't forget to put this line in
your AUTOEXEC.BAT file below the line specified in Step 2, above.
(8) If you make it this far, send US $10.00 to Langin Software at the
address at the top of this file.
*************************************
** Individual Macro Explanations **
*************************************
Notes:
The ^ character indicates a control character. For example, ^L means
"control L", which is the character to send a formfeed to a printer.
Each macro, except format, begins with an "m", for "macro". This is so
the macro names should not conflict with utility and batch file names.
"format"
--------
doskey format=rem format is disabled
Usage: format <any parameters or switches>
Disables the format command for unaware users. When FORMAT is entered,
the macro enters "rem format is disabled" instead of doing a format.
To actually use the format command, begin it with a space, like this:
" format". Then, DOS ignores the format macro and executes the actual
format command.
"mbeep"
-------
doskey mbeep=echo ^G
Usage: mbeep
^G is the "beep" character. This macro echos ^G to the display, thus
causing a beep.
"mclear"
--------
doskey mclear=mode co80
Usage: mbeep
"Mode co80" is a DOS command which resets the display to a color
80-column mode. It clears the display while doing so. Use this
when unpolite programs leave your display with 40 columns or
weird colors, or anytime when you want to clear clutter from your
display.
"mdate"
-------
doskey mdate=echo ^C$bdate
Usage: mdate
Displays the date via the DOS DATE command. Echoing ^C to the
DATE command interrupts the command when a new date is requested,
saving the user the effort of pressing <ENTER> to do this. The
"$b" stands for the pipe character (|). If this command were
entered from the DOS prompt, it would look like this:
"echo ^C|date".
"mdir"
------
doskey mdir=dir $1/ad/on/p$tpause$tdir $1/a-d/on/p
Usage: mdir [drive:][path][filename]
Displays a customized directory. It is in three parts: (1) a
directory command which displays directories in alphabetical order;
(2) a pause; and, (3) a second directory command which displays files
in alphabetical order. $1 is a variable which specifies the drive,
path, and filename, if any. $t separates the commands.
"mfilelist"
-----------
doskey mfilelist=chkdsk \/v$bmore
Usage: mfilelist
Displays a list of all of the files on a disk, including their
directories.
"mfind"
-------
doskey mfind=for %%x in ($2) do FIND $1 %%x $3$4$5$6$gtemp$ttype temp$bmore
Usage: mfind "string" [drive:][path]filename [/v][/c][/n][/i]
The DOS find command does not use the * and ? wildcard characters.
But, this macro can change that. $1 is a variable which contains
the string to search. $2 is a variable which contains the drive
and path, if any, and the filename (including wildcards) of the
files to be searched. $3, $4, $5, and $6 are variables which contain
the find switches, if any. The macro is in two parts: (1) searches
each file for the string, saving the output to a TEMP (for "temporary")
file; and, (2) the TEMP file is typed with the more filter. $g is the
> redirection symbol. $t separates the commands. $b is the pipe
character, |. Note: The DOS manual shows the switches coming before
the string, but for the macro to work, the switches must come after
the string and the filename.
"mformfeed"
-----------
doskey mformfeed=echo ^L$gprn
Usage: mformfeed
Sends a formfeed character, ^L, to the printer. $g means the >
character. From the DOS prompt, this command looks like this:
"echo ^L>prn". Some people shorten "formfeed" to "ff". However,
some people also shorten "file finder" to "ff". So, "formfeed" is
spelled out to avoid a conflict.
"mhelp"
-------
doskey mhelp=doskey/macros
Usage: mhelp
Displays a list of the currently active macros.
"mlinefeed"
-----------
doskey mlinefeed=echo ^J$gprn
Sends a linefeed character, ^J, to the printer. $g means the >
character. From the DOS prompt, this command looks like this:
"echo ^J > prn". Some people shorten "linefeed" to "lf". Some
printers will not print a line of text because the "enter" character
has not been sent to the printer. The mlinefeed macro will have
the line printed in these situations.
"mlinefeed8"
------------
doskey mlinefeed8=for %%x in (x x x x x x x x) do echo ^J$gprn
Usage: mlinefeed8
Sends eight line feeds to the printer via the for/in/do command.
%%x is a variable used just to count, and